import random
# 随机产生100个数字
numList = [round(random.random() * 100, 0) for i in range(100)]

# 记录奇数偶数的个数
even = 0
odd = 0

# 遍历列表
for num in numList:
    # 偶数
    if num % 2 == 0:
        even += 1
    # 奇数
    else:
        odd += 1

# 存放结果
result = {
    "odd": odd,
    "even": even,
}
# 输出结果
print(result)
result = dict()